<?php
ini_set("display_errors", "On");
error_reporting(E_ALL | E_STRICT);
//最少也有6个苹果
$i = 6;
$output = false;
while ($output === false){
    //分配次数
    $n = 0;
    $y = $i;
    for ($n = 1;$n <= 5;$n++){
        if($y%5 === 1){
            if($n == 5){
                $output = $i;
                break;
            }
            $y = (($y-1)/5)*4;
        }
    }
    $i++;
}
echo PHP_EOL;
echo $output;
echo PHP_EOL;